const isDev = process.env.NODE_ENV === 'development';
const extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {};
try {
  if (!extConfig.appVersion) {
    extConfig.appVersion = wx.getAccountInfoSync().miniProgram.version || '2.0.1';
  }
} catch (e) {
  console.warn(e);
}
const config = {
  isDev,
  isOpen: false, // 第三方开发
  serviceApi: 'https://testbms.itaored.com/api',
  nodeApi: 'https://testbms.itaored.com/nodeapi',
  appVersion: '2.0.0',
  static: 'https://cdn.itaored.com/static/fed/wxapp/assets',
  userInfoName: 'storage-user-info', // 本地缓存用户信息key名称
  tokenName: 'storage-token', // 本地缓存token key名称
  LOG: isDev, // dev环境打印log
  appId: 'wx29879315124888ad',
  appName: '99猫体验版',
  finderUserName: 'sphy2TU1kduCFft', // 视频号id
  project: '99_mall',
  srAppId: 'bie90a32af57214de9',
  // 和气SAAS所需要的全局店铺ID
  storeId: null,
  // rsa 公钥
  publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCilxGqpINzC4exfq9C52ubHoFGUtm2uVT/g9VF8LKYUX52ewR1D0CcIZcci9HM3mcjDke2YFnYdQ93Nka/+sTP0yig5LUXV+P4OpjjgVNxeUIEL7OCPzXvJQpKemC0ea7eWL6UoCNWwuXuvIHrKvNsTQwK54YSQxgpL2Mb7RAH+QIDAQAB'
};
console.log('extConfig-> ', extConfig);

module.exports = Object.assign(config, extConfig);
